package com.koron.css2.newProjectCenter.mapper;

import com.koron.css2.newProjectCenter.bean.WorkDayBean;
import org.apache.ibatis.annotations.*;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

public interface WorkDayMapper {
    @Insert("insert into pj_workday(id, date, year, month, day, status, create_account, create_name, update_account, update_name)" +
            "value (#{id} , #{date} , #{year}, #{month} , #{day}, #{status} , #{createAccount} , #{createName} , #{updateAccount} , #{updateName})")
    void insert(WorkDayBean record);

    void insertBatch(@Param("list") List<WorkDayBean> list);

    List<WorkDayBean> selectList(WorkDayBean bean);

    void update(WorkDayBean bean);

    @Select("select * from pj_workday where date = #{currentDate} ")
    WorkDayBean selectSpecialDate(String currentDate);

    @Delete("delete from pj_workday where year = #{year}")
    void deleteByYear(Integer year);

    @Select("select sum(time_num) from pub_up_time_custom")
    Integer getPlanSum();
}
